<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>YuTori Class: yutori.class.php ソースファイル</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 作成： Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "../../search",false,'検索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">YuTori Class</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>メインページ</span></a></li>
      <li><a href="../../pages.html"><span>関連ページ</span></a></li>
      <li><a href="../../annotated.html"><span>データ構造</span></a></li>
      <li class="current"><a href="../../files.html"><span>ファイル</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="検索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>ファイル一覧</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">yutori.class.php</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?php
<a name="l00038"></a><a class="code" href="../../db/d44/class_yu_tori_object.html">00038</a> <span class="keyword">class </span><a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> {
<a name="l00047"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#ac350be23da328a6f5429313efc9b96e4">00047</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#ac350be23da328a6f5429313efc9b96e4" title="実際に保持する対象への参照">$_instance</a> = null;
<a name="l00048"></a>00048         
<a name="l00057"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a1c89defaf5aa7ac8e526065e8572f580">00057</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a1c89defaf5aa7ac8e526065e8572f580" title="オブジェクトのツリー上での名称">$_name</a> = <span class="stringliteral">&#39;&#39;</span>;
<a name="l00058"></a>00058         
<a name="l00067"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a41480551826add2f719e24e0d44b9715">00067</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a41480551826add2f719e24e0d44b9715" title="オブジェクトの型">$_type</a> = <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>;
<a name="l00068"></a>00068         
<a name="l00077"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a8fa4d4087d153e03788aeece675aefb9">00077</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a8fa4d4087d153e03788aeece675aefb9" title="子オブジェクトへの参照">$_children</a> = array();
<a name="l00078"></a>00078         
<a name="l00087"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a855690079c56270de5b278ea3ebe99df">00087</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a855690079c56270de5b278ea3ebe99df" title="親オブジェクトへの参照">$_parents</a> = array();
<a name="l00088"></a>00088         
<a name="l00097"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">00097</a>         <span class="keyword">static</span> <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">$_info</a> = array(
<a name="l00098"></a>00098                 <span class="stringliteral">&#39;count_construct_object&#39;</span> =&gt; 0,
<a name="l00099"></a>00099                 <span class="stringliteral">&#39;count_destruct_object&#39;</span> =&gt; 0,
<a name="l00100"></a>00100                 <span class="stringliteral">&#39;count_object&#39;</span> =&gt; 0,
<a name="l00101"></a>00101                 <span class="stringliteral">&#39;count_max_object&#39;</span> =&gt; 0,
<a name="l00102"></a>00102         );
<a name="l00103"></a>00103         
<a name="l00116"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a095c5d389db211932136b53f25f39685">00116</a>         <span class="keyword">public</span> function <a class="code" href="../../db/d44/class_yu_tori_object.html#a095c5d389db211932136b53f25f39685" title="コンストラクタ">__construct</a> () {
<a name="l00117"></a>00117                 <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_construct_object&#39;</span>]++;
<a name="l00118"></a>00118                 <span class="keywordflow">if</span> (++<a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_object&#39;</span>] &gt; <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_max_object&#39;</span>]) <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_max_object&#39;</span>] = <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_object&#39;</span>];
<a name="l00119"></a>00119         }
<a name="l00120"></a>00120         
<a name="l00133"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a421831a265621325e1fdd19aace0c758">00133</a>         <span class="keyword">public</span> function <a class="code" href="../../db/d44/class_yu_tori_object.html#a421831a265621325e1fdd19aace0c758" title="デストラクタ">__destruct</a> () {
<a name="l00134"></a>00134                 <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_destruct_object&#39;</span>]++;
<a name="l00135"></a>00135                 <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_object&#39;</span>]--;
<a name="l00136"></a>00136         }
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138 
<a name="l00147"></a><a class="code" href="../../d0/dfd/class_yu_tori.html">00147</a> <span class="keyword">class </span><a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> <span class="keyword">extends</span> <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> {
<a name="l00148"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">00148</a>         <span class="keyword">static</span> <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">$_root</a> = null;
<a name="l00149"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">00149</a>         <span class="keyword">static</span> <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">$_selected</a> = array();
<a name="l00150"></a>00150         
<a name="l00151"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">00151</a>         <span class="keyword">static</span> <span class="keyword">protected</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">$_info</a> = array(
<a name="l00152"></a>00152                 <span class="stringliteral">&#39;count_construct&#39;</span> =&gt; 0,
<a name="l00153"></a>00153                 <span class="stringliteral">&#39;count_destruct&#39;</span> =&gt; 0,
<a name="l00154"></a>00154                 <span class="stringliteral">&#39;count_YuTori&#39;</span> =&gt; 0,
<a name="l00155"></a>00155                 <span class="stringliteral">&#39;count_max_YuTori&#39;</span> =&gt; 0,
<a name="l00156"></a>00156         );
<a name="l00157"></a>00157         
<a name="l00158"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7943a1fdb8789bfab359ae90f133b5ad">00158</a>         <span class="keyword">protected</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a7943a1fdb8789bfab359ae90f133b5ad">$_object</a> = null;
<a name="l00159"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a68bb763a2c4dbe1a0b104676a602a590">00159</a>         <span class="keyword">protected</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a68bb763a2c4dbe1a0b104676a602a590">$_selector</a> = <span class="stringliteral">&#39;&#39;</span>;
<a name="l00160"></a>00160         
<a name="l00161"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a694b436a3982e142f8ebf13deb81f869">00161</a>         <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a694b436a3982e142f8ebf13deb81f869">$_methodResult</a> = null;
<a name="l00162"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5699ec808c62a1af59ae8616af2d98ab">00162</a>         <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a5699ec808c62a1af59ae8616af2d98ab">$_callResult</a> = null;
<a name="l00163"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a0288656133b77ba0d064240761b1e21a">00163</a>         <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a0288656133b77ba0d064240761b1e21a">$_isCalled</a> = <span class="keyword">false</span>;
<a name="l00164"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a56fd85b2d8dc7df43a6d29b298be1350">00164</a>         <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a56fd85b2d8dc7df43a6d29b298be1350">$_isOutput</a> = <span class="keyword">true</span>;
<a name="l00165"></a>00165         
<a name="l00166"></a>00166         
<a name="l00167"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5e1f66f767bfb7293469d627772da2bb">00167</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a5e1f66f767bfb7293469d627772da2bb">TYPE_NULL</a>         =       0x01;
<a name="l00168"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2008e61ac981f88cf7a8218c600077f5">00168</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a2008e61ac981f88cf7a8218c600077f5">TYPE_BOOL</a>         =       0x02;
<a name="l00169"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a40e11b5ee4ea95b924f0c0b6d37809dc">00169</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a40e11b5ee4ea95b924f0c0b6d37809dc">TYPE_SCALAR</a>               =       0x03;
<a name="l00170"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">00170</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">TYPE_ARRAY</a>                =       0x04;
<a name="l00171"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">00171</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">TYPE_OBJECT</a>               =       0x05;
<a name="l00172"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">00172</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">TYPE_CALLABLE</a>     =       0x06;
<a name="l00173"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">00173</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">TYPE_AUTO</a>         =       0x07;
<a name="l00174"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">00174</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">TYPE_FILE</a>         =       0x08;
<a name="l00175"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">00175</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">TYPE_EMPTY</a>                =       0xff;
<a name="l00176"></a>00176         
<a name="l00177"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5d09b3be550871c5f38822d50fa4c8a0">00177</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a5d09b3be550871c5f38822d50fa4c8a0">STRING_THIS</a>               =       <span class="stringliteral">&#39;this&#39;</span>;
<a name="l00178"></a>00178         
<a name="l00191"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#acf1fe8f3a8ef1181ec36c5906101125f">00191</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#acf1fe8f3a8ef1181ec36c5906101125f" title="コンストラクタです。">__construct</a> (<a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> $instance, $selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00192"></a>00192                 $this-&gt;_selector = $selector;
<a name="l00193"></a>00193                 $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#abd01fac2d3ab887e78f0e11c7f81dad3">_setObject</a> ($instance);
<a name="l00194"></a>00194                 
<a name="l00195"></a>00195                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a>[<span class="stringliteral">&#39;count_construct&#39;</span>]++;
<a name="l00196"></a>00196                 <span class="keywordflow">if</span> (++<a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a>[<span class="stringliteral">&#39;count_YuTori&#39;</span>] &gt; <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a>[<span class="stringliteral">&#39;count_max_YuTori&#39;</span>]) <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a>[<span class="stringliteral">&#39;count_max_YuTori&#39;</span>] = <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a>[<span class="stringliteral">&#39;count_YuTori&#39;</span>];
<a name="l00197"></a>00197         }
<a name="l00198"></a>00198         
<a name="l00211"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a421831a265621325e1fdd19aace0c758">00211</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a421831a265621325e1fdd19aace0c758" title="デストラクタ">__destruct</a> () {
<a name="l00212"></a>00212                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a>[<span class="stringliteral">&#39;count_destruct&#39;</span>]++;
<a name="l00213"></a>00213                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a>[<span class="stringliteral">&#39;count_YuTori&#39;</span>]--;
<a name="l00214"></a>00214         }
<a name="l00215"></a>00215         
<a name="l00216"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a9f0be6ae273d3669e11c29910a0be338">00216</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a9f0be6ae273d3669e11c29910a0be338">init</a> () {
<a name="l00217"></a>00217                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a> = null;
<a name="l00218"></a>00218                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a> = array();
<a name="l00219"></a>00219                 
<a name="l00220"></a>00220                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a> = array(
<a name="l00221"></a>00221                         <span class="stringliteral">&#39;count_construct&#39;</span> =&gt; 0,
<a name="l00222"></a>00222                         <span class="stringliteral">&#39;count_destruct&#39;</span> =&gt; 0,
<a name="l00223"></a>00223                         <span class="stringliteral">&#39;count_YuTori&#39;</span> =&gt; 0,
<a name="l00224"></a>00224                         <span class="stringliteral">&#39;count_max_YuTori&#39;</span> =&gt; 0,
<a name="l00225"></a>00225                 );
<a name="l00226"></a>00226                 <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a> = array(
<a name="l00227"></a>00227                         <span class="stringliteral">&#39;count_construct_object&#39;</span> =&gt; 0,
<a name="l00228"></a>00228                         <span class="stringliteral">&#39;count_destruct_object&#39;</span> =&gt; 0,
<a name="l00229"></a>00229                         <span class="stringliteral">&#39;count_object&#39;</span> =&gt; 0,
<a name="l00230"></a>00230                         <span class="stringliteral">&#39;count_max_object&#39;</span> =&gt; 0,
<a name="l00231"></a>00231                 );
<a name="l00232"></a>00232         }
<a name="l00233"></a>00233         
<a name="l00234"></a>00234         <span class="comment">/**************** Methods for Instances ****************/</span>
<a name="l00235"></a>00235         
<a name="l00240"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">00240</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">factory</a> ($instance, $name = null, array $children = array(), $type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) {
<a name="l00241"></a>00241                 <span class="keywordflow">try</span> {
<a name="l00242"></a>00242                         $objYuTori = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(&amp;$instance, $name, &amp;$children, $type);
<a name="l00243"></a>00243                         <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> ($objYuTori, $objYuTori-&gt;_name);
<a name="l00244"></a>00244                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00245"></a>00245                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00246"></a>00246                 }
<a name="l00247"></a>00247         }
<a name="l00248"></a>00248         
<a name="l00253"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">00253</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">newObject</a> ($instance, $name = null, array $children = array(), $type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) {
<a name="l00254"></a>00254                 <span class="keywordflow">try</span> {
<a name="l00255"></a>00255                         $name = str_replace (array(<span class="charliteral">&#39;.&#39;</span>, <span class="charliteral">&#39; &#39;</span>), <span class="stringliteral">&#39;&#39;</span>, $name);
<a name="l00256"></a>00256                         <span class="keywordflow">if</span> (strcasecmp(<a class="code" href="../../d0/dfd/class_yu_tori.html#a5d09b3be550871c5f38822d50fa4c8a0">YuTori::STRING_THIS</a>, $name) === 0) <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception (<span class="stringliteral">&#39;YuToriObject cannot be named &quot;this&quot;&#39;</span>);
<a name="l00257"></a>00257                         $newChildren = array();
<a name="l00258"></a>00258                         
<a name="l00259"></a>00259                         <span class="keywordflow">if</span> ($instance instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a>) {
<a name="l00260"></a>00260                                 <span class="keywordflow">if</span> ($name) $instance-&gt;_name = $name;
<a name="l00261"></a>00261                                 <span class="keywordflow">if</span> (isset($instance-&gt;_object)) $objYuTori = $instance-&gt;_object;
<a name="l00262"></a>00262                                 <span class="keywordflow">else</span> $objYuTori = $instance;
<a name="l00263"></a>00263                                 $newChildren = &amp;$objYuTori-&gt;_children;
<a name="l00264"></a>00264                                 unset ($objYuTori-&gt;_children);
<a name="l00265"></a>00265                                 $objYuTori-&gt;_children = array();
<a name="l00266"></a>00266                         } <span class="keywordflow">else</span> {
<a name="l00267"></a>00267                                 $objYuTori = <span class="keyword">new</span> YuToriObject ();
<a name="l00268"></a>00268                                 $objYuTori-&gt;_name = $name;
<a name="l00269"></a>00269                                 <span class="keywordflow">switch</span> ($type) {
<a name="l00270"></a>00270                                         <span class="keywordflow">case</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>) :
<a name="l00271"></a>00271                                                 <span class="keywordflow">if</span> (is_callable($instance)) {
<a name="l00272"></a>00272                                                         $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>;
<a name="l00273"></a>00273                                                         <span class="keywordflow">if</span> ($name == null) {
<a name="l00274"></a>00274                                                                 <span class="keywordflow">if</span> (is_array($instance)) $objYuTori-&gt;_name = $instance[1];
<a name="l00275"></a>00275                                                                 <span class="keywordflow">else</span> $objYuTori-&gt;_name = $instance;
<a name="l00276"></a>00276                                                         }
<a name="l00277"></a>00277                                                 }
<a name="l00278"></a>00278                                         <span class="keywordflow">break</span>;
<a name="l00279"></a>00279                                         <span class="keywordflow">case</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a>) :
<a name="l00280"></a>00280                                                 <span class="keywordflow">if</span> (is_file($instance)) {
<a name="l00281"></a>00281                                                         $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a>;
<a name="l00282"></a>00282                                                 }
<a name="l00283"></a>00283                                         <span class="keywordflow">break</span>;
<a name="l00284"></a>00284                                         <span class="keywordflow">case</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) :
<a name="l00285"></a>00285                                                 <span class="keywordflow">if</span> (is_null($instance)) {
<a name="l00286"></a>00286                                                         $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5e1f66f767bfb7293469d627772da2bb">YuTori::TYPE_NULL</a>;
<a name="l00287"></a>00287                                                 } elseif (is_bool ($instance)) {
<a name="l00288"></a>00288                                                         $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a2008e61ac981f88cf7a8218c600077f5">YuTori::TYPE_BOOL</a>;
<a name="l00289"></a>00289                                                 } elseif (is_scalar ($instance)) {
<a name="l00290"></a>00290                                                         $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a40e11b5ee4ea95b924f0c0b6d37809dc">YuTori::TYPE_SCALAR</a>;
<a name="l00291"></a>00291                                                 } elseif (is_array ($instance)) {
<a name="l00292"></a>00292                                                         $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">YuTori::TYPE_ARRAY</a>;
<a name="l00293"></a>00293                                                         <span class="keywordflow">foreach</span> ($instance as $key=&gt;$val) {
<a name="l00294"></a>00294                                                                 <span class="keywordflow">if</span> (is_a ($val, <span class="stringliteral">&#39;YuToriObject&#39;</span>)) {
<a name="l00295"></a>00295                                                                         $newChildren[] = $val;
<a name="l00296"></a>00296                                                                 } <span class="keywordflow">else</span> {
<a name="l00297"></a>00297                                                                         $child = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a> (&amp;$instance[$key], $key);
<a name="l00298"></a>00298                                                                         $child-&gt;_parents[] = $objYuTori;
<a name="l00299"></a>00299                                                                         $newChildren[] = $child;
<a name="l00300"></a>00300                                                                 }
<a name="l00301"></a>00301                                                         }
<a name="l00302"></a>00302                                                         unset ($instance); $instance = array();
<a name="l00303"></a>00303                                                 } elseif (is_object ($instance)) {
<a name="l00304"></a>00304                                                         $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a>;
<a name="l00305"></a>00305                                                 }
<a name="l00306"></a>00306                                                 <span class="keywordflow">break</span>;
<a name="l00307"></a>00307                                         <span class="keywordflow">default</span>:
<a name="l00308"></a>00308                                                 <span class="keywordflow">break</span>;
<a name="l00309"></a>00309                                 }
<a name="l00310"></a>00310                                 <span class="keywordflow">if</span> ($objYuTori-&gt;_type == <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>) {
<a name="l00311"></a>00311                                         $objYuTori-&gt;_name = null;
<a name="l00312"></a>00312                                         $instance = null;
<a name="l00313"></a>00313                                 }
<a name="l00314"></a>00314                                 
<a name="l00315"></a>00315                                 $objYuTori-&gt;_instance = &amp;$instance;
<a name="l00316"></a>00316                         }
<a name="l00317"></a>00317                         <span class="keywordflow">foreach</span> ($children as $key=&gt;$val) {
<a name="l00318"></a>00318                                 <span class="keywordflow">if</span> (is_a ($val, <span class="stringliteral">&#39;YuToriObject&#39;</span>)) {
<a name="l00319"></a>00319                                         $newChildren[] = $val;
<a name="l00320"></a>00320                                 } <span class="keywordflow">else</span> {
<a name="l00321"></a>00321                                         $child = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a> (&amp;$children[$key], $key);
<a name="l00322"></a>00322                                         $child-&gt;_parents[] = $objYuTori;
<a name="l00323"></a>00323                                         $newChildren[] = $child;
<a name="l00324"></a>00324                                 }
<a name="l00325"></a>00325                         }
<a name="l00326"></a>00326                         $i = 0;
<a name="l00327"></a>00327                         <span class="keywordflow">foreach</span> ($newChildren as $val) {
<a name="l00328"></a>00328                                 <span class="keywordflow">if</span> (is_numeric($val-&gt;_name)) $val-&gt;_name = $i++;
<a name="l00329"></a>00329                                 $objYuTori-&gt;_children[] = $val;
<a name="l00330"></a>00330                         }
<a name="l00331"></a>00331                         
<a name="l00332"></a>00332                         <span class="keywordflow">return</span> $objYuTori;
<a name="l00333"></a>00333                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00334"></a>00334                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00335"></a>00335                 }
<a name="l00336"></a>00336         }
<a name="l00337"></a>00337         
<a name="l00338"></a>00338         <span class="comment">/**************** Methods for Selectors ****************/</span>
<a name="l00339"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#aafa0f77afb62699a7be6e65127a06fbd">00339</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#aafa0f77afb62699a7be6e65127a06fbd">getSelector</a> () {
<a name="l00340"></a>00340                 <span class="keywordflow">return</span> $this-&gt;_selector;
<a name="l00341"></a>00341         }
<a name="l00342"></a>00342         
<a name="l00343"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a976ccae12b0117ff37f1a7d492ee91fc">00343</a>         <span class="keyword">static</span> <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a976ccae12b0117ff37f1a7d492ee91fc">selected</a> ($before = 0) {
<a name="l00344"></a>00344                 <span class="keywordflow">if</span> ($cnt = <a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a>(<a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a>)) {
<a name="l00345"></a>00345                         <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a>[$cnt-1-$before]);
<a name="l00346"></a>00346                 } <span class="keywordflow">else</span> {
<a name="l00347"></a>00347                         <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">YuTori::rootSelector</a> ();
<a name="l00348"></a>00348                 }
<a name="l00349"></a>00349         }
<a name="l00350"></a>00350         
<a name="l00355"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">00355</a>         <span class="keyword">static</span> <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">rootSelector</a> ($selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00356"></a>00356                 <span class="keywordflow">try</span> {
<a name="l00357"></a>00357                         <span class="keywordflow">if</span> (is_null(<a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a>)) <a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a> = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(null, <span class="stringliteral">&#39;Root&#39;</span>);
<a name="l00358"></a>00358                         <span class="keywordflow">if</span> ($selector instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a>) {
<a name="l00359"></a>00359                                 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> ($selector);
<a name="l00360"></a>00360                         } <span class="keywordflow">else</span> {
<a name="l00361"></a>00361                                 <span class="keywordflow">if</span> (strlen ($selector) == 0) {
<a name="l00362"></a>00362                                         <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a>);
<a name="l00363"></a>00363                                 } <span class="keywordflow">else</span>{
<a name="l00364"></a>00364                                         $object = <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a>);
<a name="l00365"></a>00365                                         <span class="keywordflow">if</span> (func_num_args() &gt; 1) {
<a name="l00366"></a>00366                                                 $objRet = $object-&gt;_searchArray($object-&gt;_children, $selector, func_get_arg(1));
<a name="l00367"></a>00367                                                 <span class="keywordflow">if</span> ($selector) <span class="keywordflow">return</span> $objRet-&gt;child ($selector, func_get_arg(1));
<a name="l00368"></a>00368                                                 <span class="keywordflow">else</span> <span class="keywordflow">return</span> $objRet;
<a name="l00369"></a>00369                                         } <span class="keywordflow">else</span> {
<a name="l00370"></a>00370                                                 $objRet = $object-&gt;_searchArray($object-&gt;_children, $selector);
<a name="l00371"></a>00371                                                 <span class="keywordflow">if</span> ($selector) <span class="keywordflow">return</span> $objRet-&gt;child ($selector);
<a name="l00372"></a>00372                                                 <span class="keywordflow">else</span> <span class="keywordflow">return</span> $objRet;
<a name="l00373"></a>00373                                         }
<a name="l00374"></a>00374                                 }
<a name="l00375"></a>00375                         }
<a name="l00376"></a>00376                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00377"></a>00377                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00378"></a>00378                 }
<a name="l00379"></a>00379         }
<a name="l00380"></a>00380         
<a name="l00381"></a>00381         <span class="comment">/**************** Internal Methods ****************/</span>
<a name="l00386"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#abd01fac2d3ab887e78f0e11c7f81dad3">00386</a>         <span class="keyword">private</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#abd01fac2d3ab887e78f0e11c7f81dad3">_setObject</a> (<a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> $object) {
<a name="l00387"></a>00387                 $this-&gt;_instance        = &amp;$object-&gt;_instance;
<a name="l00388"></a>00388                 $this-&gt;_name            = &amp;$object-&gt;_name;
<a name="l00389"></a>00389                 $this-&gt;_type            = &amp;$object-&gt;_type;
<a name="l00390"></a>00390                 $this-&gt;_children        = &amp;$object-&gt;_children;
<a name="l00391"></a>00391                 $this-&gt;_parents = &amp;$object-&gt;_parents;
<a name="l00392"></a>00392                 
<a name="l00393"></a>00393                 <span class="keywordflow">if</span> (isset($object-&gt;_object)) $this-&gt;_object     = &amp;$object-&gt;_object;
<a name="l00394"></a>00394                 <span class="keywordflow">else</span> $this-&gt;_object     = &amp;$object;
<a name="l00395"></a>00395         }
<a name="l00396"></a>00396         
<a name="l00401"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">00401</a>         <span class="keyword">private</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> ($methodName, $callOption=0, &amp;$arg1=null,&amp;$arg2=null,&amp;$arg3=null,&amp;$arg4=null) {
<a name="l00402"></a>00402                 <span class="keywordflow">try</span> {
<a name="l00403"></a>00403                         <a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a>[] = $this;
<a name="l00404"></a>00404                         $this-&gt;_methodResult = null;
<a name="l00405"></a>00405                         <span class="keywordflow">if</span> ($callOption &amp; 0x01) {
<a name="l00406"></a>00406                                 $this-&gt;_callResult = null;
<a name="l00407"></a>00407                                 $this-&gt;_isCalled = <span class="keyword">false</span>;
<a name="l00408"></a>00408                         }
<a name="l00409"></a>00409                         <span class="keywordflow">if</span> ($callOption &amp; 0x10 &amp;&amp; $this-&gt;_callResult == null) {
<a name="l00410"></a>00410                                 $this-&gt;_callResult = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00411"></a>00411                         }
<a name="l00412"></a>00412                         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00413"></a>00413                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00414"></a>00414                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00415"></a>00415                 }
<a name="l00416"></a>00416         }
<a name="l00417"></a>00417         
<a name="l00422"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">00422</a>         <span class="keyword">private</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> () {
<a name="l00423"></a>00423                 <span class="keywordflow">try</span> {
<a name="l00424"></a>00424                         array_pop(<a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a>);
<a name="l00425"></a>00425                         <span class="keywordflow">return</span> $this-&gt;_methodResult;
<a name="l00426"></a>00426                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00427"></a>00427                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00428"></a>00428                 }
<a name="l00429"></a>00429         }
<a name="l00430"></a>00430         
<a name="l00431"></a>00431         <span class="comment">/**************** Methods for YuTori ****************/</span>
<a name="l00438"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a830b5c75df72b32396701bc563fbe3c7">00438</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a830b5c75df72b32396701bc563fbe3c7">getType</a> () {<span class="keywordflow">return</span> $this-&gt;_type;}
<a name="l00439"></a>00439         
<a name="l00447"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2fe666694997d047711d7653eca2f132">00447</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a2fe666694997d047711d7653eca2f132">setName</a> ($name) {
<a name="l00448"></a>00448                 <span class="keywordflow">if</span> (is_scalar ($name)) $this-&gt;_name = $name;
<a name="l00449"></a>00449                 <span class="keywordflow">return</span> $this-&gt;_name;
<a name="l00450"></a>00450         }
<a name="l00451"></a>00451         
<a name="l00458"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a3d0963e68bb313b163a73f2803c64600">00458</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a3d0963e68bb313b163a73f2803c64600">getName</a> () {
<a name="l00459"></a>00459                 <span class="keywordflow">return</span> $this-&gt;_name;
<a name="l00460"></a>00460         }
<a name="l00461"></a>00461         
<a name="l00468"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2b284f11184201a8ba8a92de57f93580">00468</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a2b284f11184201a8ba8a92de57f93580">getFullName</a> () {
<a name="l00469"></a>00469                 $fullName = $this-&gt;_name;
<a name="l00470"></a>00470                 $obj = $this;
<a name="l00471"></a>00471                 <span class="keywordflow">while</span> (isset ($obj-&gt;_parents[0])) {
<a name="l00472"></a>00472                         $obj = $obj-&gt;_parents[0];
<a name="l00473"></a>00473                         $fullName = $obj-&gt;_name. <span class="charliteral">&#39;.&#39;</span>. $fullName;
<a name="l00474"></a>00474                 }
<a name="l00475"></a>00475                 <span class="keywordflow">return</span> $fullName;
<a name="l00476"></a>00476         }
<a name="l00477"></a>00477         
<a name="l00478"></a>00478         <span class="comment">/**************** Methods for Manipulate ****************/</span>
<a name="l00479"></a>00479         
<a name="l00487"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#ac33ee765f5ad9f134540bac393721cfe">00487</a>         <span class="keyword">public</span> function <span class="keyword">get</span> () {
<a name="l00488"></a>00488                 <span class="keywordflow">try</span> {
<a name="l00489"></a>00489                         <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__)) {
<a name="l00490"></a>00490                                 <span class="keywordflow">switch</span> ($this-&gt;_type) {
<a name="l00491"></a>00491                                         <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">YuTori::TYPE_ARRAY</a> :
<a name="l00492"></a>00492                                                 $this-&gt;_methodResult = array();
<a name="l00493"></a>00493                                         $index = -1;
<a name="l00494"></a>00494                                         <span class="keywordflow">while</span> (isset($this-&gt;_children[++$index])) {
<a name="l00495"></a>00495                                                 $obj = <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> ($this-&gt;_children[$index], $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$this-&gt;_children[$index]-&gt;_name);
<a name="l00496"></a>00496                                                 $this-&gt;_methodResult[$obj-&gt;_name] = $obj-&gt;get();
<a name="l00497"></a>00497                                         }
<a name="l00498"></a>00498                                         <span class="keywordflow">break</span>;
<a name="l00499"></a>00499                                         <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a> :
<a name="l00500"></a>00500                                                 $this-&gt;_methodResult = file_get_contents($this-&gt;_instance);
<a name="l00501"></a>00501                                         <span class="keywordflow">break</span>;
<a name="l00502"></a>00502                                         <span class="keywordflow">default</span>: 
<a name="l00503"></a>00503                                                 $this-&gt;_methodResult = $this-&gt;_instance;
<a name="l00504"></a>00504                                         <span class="keywordflow">break</span>;
<a name="l00505"></a>00505                                 }
<a name="l00506"></a>00506                         }
<a name="l00507"></a>00507                         <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> ();
<a name="l00508"></a>00508                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00509"></a>00509                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00510"></a>00510                 }
<a name="l00511"></a>00511         }
<a name="l00512"></a>00512         
<a name="l00517"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a98a9497f8c0d2aebb0d3873540d296d2">00517</a>         <span class="keyword">public</span> function <span class="keyword">set</span> ($instance, $type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) {
<a name="l00518"></a>00518                 <span class="keywordflow">try</span> {
<a name="l00519"></a>00519                         <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0x01)) {
<a name="l00520"></a>00520                                 $this-&gt;_methodResult = $this;
<a name="l00521"></a>00521                                 $objYuTori = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(&amp;$instance, $this-&gt;_name, array(), $type);
<a name="l00522"></a>00522                                 <span class="keywordflow">if</span> ($objYuTori-&gt;_type !== <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>) {
<a name="l00523"></a>00523                                         $this-&gt;_object-&gt;_children = array_merge($this-&gt;_children, $objYuTori-&gt;_children);
<a name="l00524"></a>00524                                         $this-&gt;_object-&gt;_instance = $objYuTori-&gt;_instance;
<a name="l00525"></a>00525                                         $this-&gt;_object-&gt;_type = $objYuTori-&gt;_type;
<a name="l00526"></a>00526                                 }
<a name="l00527"></a>00527                         } <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> ();
<a name="l00528"></a>00528                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00529"></a>00529                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00530"></a>00530                 }
<a name="l00531"></a>00531         }
<a name="l00532"></a>00532         
<a name="l00538"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#afc89964e20722727eaaedcb2b7c0d0f6">00538</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#afc89964e20722727eaaedcb2b7c0d0f6">pick</a> () { <span class="keywordflow">return</span> $this-&gt;_object; }
<a name="l00539"></a>00539         
<a name="l00554"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">00554</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a> () {
<a name="l00555"></a>00555                 <span class="keywordflow">try</span> {
<a name="l00556"></a>00556                         <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0)) {
<a name="l00557"></a>00557                                 <span class="keywordflow">switch</span> ($this-&gt;_type) {
<a name="l00558"></a>00558                                         <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">YuTori::TYPE_ARRAY</a> :
<a name="l00559"></a>00559                                                 $this-&gt;_methodResult = array();
<a name="l00560"></a>00560                                         $index = -1;
<a name="l00561"></a>00561                                         <span class="keywordflow">while</span> (isset($this-&gt;_children[++$index])) {
<a name="l00562"></a>00562                                                 $obj = <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> ($this-&gt;_children[$index], $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$this-&gt;_children[$index]-&gt;_name);
<a name="l00563"></a>00563                                                 $this-&gt;_methodResult[$obj-&gt;_name] = call_user_func_array(array($obj, <span class="stringliteral">&quot;call&quot;</span>), func_get_args());
<a name="l00564"></a>00564                                         }
<a name="l00565"></a>00565                                         <span class="keywordflow">break</span>;
<a name="l00566"></a>00566                                         <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a> :
<a name="l00567"></a>00567                                                 <span class="keywordflow">if</span> (method_exists ($this-&gt;_instance, <span class="stringliteral">&quot;call&quot;</span>)) {
<a name="l00568"></a>00568                                                         $this-&gt;_methodResult = call_user_func_array(array($this-&gt;_instance, <span class="stringliteral">&quot;call&quot;</span>), func_get_args ());
<a name="l00569"></a>00569                                                 } <span class="keywordflow">else</span> {
<a name="l00570"></a>00570                                                         $this-&gt;_methodResult = $this-&gt;_instance;
<a name="l00571"></a>00571                                                 }
<a name="l00572"></a>00572                                         <span class="keywordflow">break</span>;
<a name="l00573"></a>00573                                         <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a> :
<a name="l00574"></a>00574                                                 $this-&gt;_methodResult = call_user_func_array($this-&gt;_instance, func_get_args ());
<a name="l00575"></a>00575                                         <span class="keywordflow">break</span>;
<a name="l00576"></a>00576                                         <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a> :
<a name="l00577"></a>00577                                                 include ($this-&gt;_instance);
<a name="l00578"></a>00578                                         <span class="keywordflow">break</span>;
<a name="l00579"></a>00579                                         <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a> :
<a name="l00580"></a>00580                                                 $this-&gt;_methodResult = null;
<a name="l00581"></a>00581                                         <span class="keywordflow">break</span>;
<a name="l00582"></a>00582                                         <span class="keywordflow">default</span>: 
<a name="l00583"></a>00583                                                 $this-&gt;_methodResult = $this-&gt;_instance;
<a name="l00584"></a>00584                                         <span class="keywordflow">break</span>;
<a name="l00585"></a>00585                                 }
<a name="l00586"></a>00586                         }
<a name="l00587"></a>00587                         $this-&gt;_callResult = $this-&gt;_methodResult;
<a name="l00588"></a>00588                         $this-&gt;_isCalled = <span class="keyword">true</span>;
<a name="l00589"></a>00589                         <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> ();
<a name="l00590"></a>00590                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00591"></a>00591                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00592"></a>00592                 }
<a name="l00593"></a>00593         }
<a name="l00594"></a>00594         
<a name="l00595"></a>00595         <span class="comment">/**************** Methods for Families ****************/</span>
<a name="l00596"></a>00596         
<a name="l00601"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a43331c60cdffea7648b06cef12580c15">00601</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a43331c60cdffea7648b06cef12580c15">add</a> ($instance, $name = null, $children = array(), $type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) {
<a name="l00602"></a>00602                 <span class="keywordflow">try</span> {
<a name="l00603"></a>00603                         <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0, $instance, $name, $children, $type)) {
<a name="l00604"></a>00604                                 $child = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a> (&amp;$instance, $name, $children, $type);
<a name="l00605"></a>00605                                 <span class="keywordflow">if</span> ($child-&gt;_type != <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>) {
<a name="l00606"></a>00606                                         $child-&gt;_parents[] = $this-&gt;_object;
<a name="l00607"></a>00607                                         <span class="keywordflow">if</span> ($child-&gt;_name) {
<a name="l00608"></a>00608                                                 <span class="keywordflow">foreach</span> ($this-&gt;_children as $key=&gt;$obj) {
<a name="l00609"></a>00609                                                         <span class="keywordflow">if</span> (strcasecmp($child-&gt;_name, $obj-&gt;_name) === 0) {
<a name="l00610"></a>00610                                                                 unset ($this-&gt;_children[$key]);
<a name="l00611"></a>00611                                                                 $this-&gt;_children = array_values ($this-&gt;_children);
<a name="l00612"></a>00612                                                                 <span class="keywordflow">foreach</span> ($obj-&gt;_parents as $parentKey=&gt;$parentObj) {
<a name="l00613"></a>00613                                                                         <span class="keywordflow">if</span> (strcasecmp($this-&gt;_name, $parentObj-&gt;_name) === 0) {
<a name="l00614"></a>00614                                                                                 unset ($parentObj-&gt;_parents[$parentKey]);
<a name="l00615"></a>00615                                                                                 $parentObj-&gt;_parents = array_values ($parentObj-&gt;_parents);
<a name="l00616"></a>00616                                                                         }
<a name="l00617"></a>00617                                                                 }
<a name="l00618"></a>00618                                                         }
<a name="l00619"></a>00619                                                 }
<a name="l00620"></a>00620                                         } <span class="keywordflow">else</span> {
<a name="l00621"></a>00621                                                 $child-&gt;_name = <a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a> ($this-&gt;_children);
<a name="l00622"></a>00622                                         }
<a name="l00623"></a>00623                                         $this-&gt;_children[] = $child;
<a name="l00624"></a>00624                                 }
<a name="l00625"></a>00625                                 $this-&gt;_methodResult = <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> ($child, $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$child-&gt;_name);
<a name="l00626"></a>00626                         }
<a name="l00627"></a>00627                         <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> (__FUNCTION__);
<a name="l00628"></a>00628                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00629"></a>00629                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00630"></a>00630                 }
<a name="l00631"></a>00631         }
<a name="l00632"></a>00632         
<a name="l00643"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a66a9777ce025e9ce801bdf352268f5c2">00643</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a66a9777ce025e9ce801bdf352268f5c2">child</a> ($selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00644"></a>00644                 <span class="keywordflow">try</span> {
<a name="l00645"></a>00645                         <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0, $selector)) {
<a name="l00646"></a>00646                                 <span class="keywordflow">if</span> (func_num_args() &gt; 1) {
<a name="l00647"></a>00647                                         $objRet = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a>($this-&gt;_children, $selector, func_get_arg(1));
<a name="l00648"></a>00648                                         <span class="keywordflow">if</span> ($selector) $this-&gt;_methodResult = $objRet-&gt;child ($selector, func_get_arg(1));
<a name="l00649"></a>00649                                         <span class="keywordflow">else</span> $this-&gt;_methodResult = $objRet;
<a name="l00650"></a>00650                                 } <span class="keywordflow">else</span> {
<a name="l00651"></a>00651                                         $objRet = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a>($this-&gt;_children, $selector);
<a name="l00652"></a>00652                                         <span class="keywordflow">if</span> ($selector) $this-&gt;_methodResult = $objRet-&gt;child ($selector);
<a name="l00653"></a>00653                                         <span class="keywordflow">else</span> $this-&gt;_methodResult = $objRet;
<a name="l00654"></a>00654                                 }
<a name="l00655"></a>00655                         }
<a name="l00656"></a>00656                         <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00657"></a>00657                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00658"></a>00658                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00659"></a>00659                 }
<a name="l00660"></a>00660         }
<a name="l00661"></a>00661         
<a name="l00668"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#af2256747dd7f5f0a5995ec33a70c92e8">00668</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#af2256747dd7f5f0a5995ec33a70c92e8">parent</a> ($selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00669"></a>00669                 <span class="keywordflow">try</span> {
<a name="l00670"></a>00670                         <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0, $selector)) {
<a name="l00671"></a>00671                                 <span class="keywordflow">if</span> (func_num_args() &gt; 1) {
<a name="l00672"></a>00672                                         $objRet = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a>($this-&gt;_parents, $selector, func_get_arg(1));
<a name="l00673"></a>00673                                         <span class="keywordflow">if</span> ($selector) $this-&gt;_methodResult = $objRet-&gt;parent ($selector, func_get_arg(1));
<a name="l00674"></a>00674                                         <span class="keywordflow">else</span> $this-&gt;_methodResult = $objRet;
<a name="l00675"></a>00675                                 } <span class="keywordflow">else</span> {
<a name="l00676"></a>00676                                         $objRet = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a>($this-&gt;_parents, $selector);
<a name="l00677"></a>00677                                         <span class="keywordflow">if</span> ($selector) $this-&gt;_methodResult = $objRet-&gt;parent ($selector);
<a name="l00678"></a>00678                                         <span class="keywordflow">else</span> $this-&gt;_methodResult = $objRet;
<a name="l00679"></a>00679                                 }
<a name="l00680"></a>00680                         }
<a name="l00681"></a>00681                         <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00682"></a>00682                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00683"></a>00683                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00684"></a>00684                 }
<a name="l00685"></a>00685         }
<a name="l00686"></a>00686         
<a name="l00695"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#ac4a0c353b6afadd90e066a769d02de93">00695</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#ac4a0c353b6afadd90e066a769d02de93">neighbor</a> ($childSelector = <span class="stringliteral">&#39;&#39;</span>, $parentSelector = 0) {
<a name="l00696"></a>00696                 <span class="keywordflow">try</span> {
<a name="l00697"></a>00697                         <span class="keywordflow">if</span> (($objParent = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af2256747dd7f5f0a5995ec33a70c92e8">parent</a>($parentSelector, <span class="keyword">false</span>)) &amp;&amp; ($objChild = $objParent-&gt;child($childSelector))) {
<a name="l00698"></a>00698                                 <span class="keywordflow">return</span> $objChild;
<a name="l00699"></a>00699                         }
<a name="l00700"></a>00700                         <span class="keywordflow">if</span> (func_num_args() &gt; 2) <span class="keywordflow">return</span> func_get_arg(2);
<a name="l00701"></a>00701                         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(<span class="stringliteral">&#39;&#39;</span>, null, <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>), $childSelector);
<a name="l00702"></a>00702                 } <span class="keywordflow">catch</span> (Exception $e) {
<a name="l00703"></a>00703                         <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception ($e-&gt;getMessage(), $e-&gt;getCode(), $e);
<a name="l00704"></a>00704                 }
<a name="l00705"></a>00705         }
<a name="l00706"></a>00706         
<a name="l00712"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">00712</a>         <span class="keyword">private</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a> (&amp;$array, &amp;$orgSelector) {
<a name="l00713"></a>00713                 $selector = $orgSelector;
<a name="l00714"></a>00714                 $orgSelector = null;
<a name="l00715"></a>00715                 <span class="keywordflow">if</span> ($selector === <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00716"></a>00716                         <span class="comment">// セレクタが空の時はオブジェクトを全て返す。</span>
<a name="l00717"></a>00717                         $arrObject = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>($array);
<a name="l00718"></a>00718                         <span class="keywordflow">return</span> $arrObject;
<a name="l00719"></a>00719                 } elseif (is_object ($selector)) {
<a name="l00720"></a>00720                         <span class="keywordflow">foreach</span> ($array as $key=&gt;$obj) {
<a name="l00721"></a>00721                                 <span class="keywordflow">if</span> (($selector instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> &amp;&amp; $obj-&gt;_instance === $selector-&gt;_instance) || ($selector === $obj-&gt;_instance)) {
<a name="l00722"></a>00722                                         <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> ($obj, $selector);
<a name="l00723"></a>00723                                 }
<a name="l00724"></a>00724                         }
<a name="l00725"></a>00725                 } elseif (is_scalar($selector)) {
<a name="l00726"></a>00726                         <span class="comment">// 現在のセレクタを判定</span>
<a name="l00727"></a>00727                         $selector = str_replace (<span class="charliteral">&#39; &#39;</span>, <span class="stringliteral">&#39;&#39;</span>, $selector);
<a name="l00728"></a>00728                         $exSelector = explode (<span class="charliteral">&#39;.&#39;</span>, $selector, 2);
<a name="l00729"></a>00729                         <span class="keywordflow">if</span> (isset($exSelector[1])) $orgSelector = trim($exSelector[1], <span class="charliteral">&#39;.&#39;</span>);
<a name="l00730"></a>00730                         
<a name="l00731"></a>00731                         <span class="comment">// セレクタが数値か文字列か</span>
<a name="l00732"></a>00732                         <span class="keywordflow">if</span> (is_numeric ($exSelector[0])) {
<a name="l00733"></a>00733                                 <span class="keywordflow">if</span> (isset ($array[$exSelector[0]])) <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> ($array[$exSelector[0]], $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$exSelector[0]);
<a name="l00734"></a>00734                         } elseif (is_string ($exSelector[0]) &amp;&amp; strcasecmp($exSelector[0], <a class="code" href="../../d0/dfd/class_yu_tori.html#a5d09b3be550871c5f38822d50fa4c8a0">YuTori::STRING_THIS</a>)===0) {
<a name="l00735"></a>00735                                 <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a976ccae12b0117ff37f1a7d492ee91fc">YuTori::selected</a>();
<a name="l00736"></a>00736                         } elseif (is_string ($exSelector[0])) {
<a name="l00737"></a>00737                                 <span class="keywordflow">foreach</span> ($array as $key=&gt;$obj) {
<a name="l00738"></a>00738                                         <span class="keywordflow">if</span> (strcasecmp ($exSelector[0], $obj-&gt;_name) == 0) <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> ($array[$key], $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$exSelector[0]);
<a name="l00739"></a>00739                                 }
<a name="l00740"></a>00740                         }
<a name="l00741"></a>00741                 }
<a name="l00742"></a>00742                 <span class="keywordflow">if</span> (func_num_args() &gt; 2) <span class="keywordflow">return</span> func_get_arg(2);
<a name="l00743"></a>00743                 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html" title="YuTori動作の根幹をなすクラスです。">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(<span class="stringliteral">&#39;&#39;</span>, null, array(), <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>), $selector);
<a name="l00744"></a>00744         }
<a name="l00745"></a>00745         
<a name="l00751"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">00751</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a> () {
<a name="l00752"></a>00752                 <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a> ($this-&gt;_children);
<a name="l00753"></a>00753         }
<a name="l00754"></a>00754         
<a name="l00762"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a8a8f910d6cb5ba728e20a76726ffb325">00762</a>         <span class="keyword">public</span> function <span class="keyword">remove</span> ($Name) {
<a name="l00763"></a>00763                 <span class="comment">// 子を検索</span>
<a name="l00764"></a>00764                 <span class="keywordflow">foreach</span> ($this-&gt;_children as $key=&gt;$Child) {
<a name="l00765"></a>00765                         <span class="keywordflow">if</span> (strcasecmp($Child-&gt;_name,$Name) === 0) {
<a name="l00766"></a>00766                                 <span class="keywordflow">foreach</span> ($Child-&gt;_parents as $unsetKey=&gt;$unsetObj) {
<a name="l00767"></a>00767                                         <span class="keywordflow">if</span> ($Child === $unsetObj) {
<a name="l00768"></a>00768                                                 unset ($Child-&gt;_parents[$unsetKey]);
<a name="l00769"></a>00769                                                 $Child-&gt;_parents = array_values ($Child-&gt;_parents);
<a name="l00770"></a>00770                                         }
<a name="l00771"></a>00771                                 }
<a name="l00772"></a>00772                                 unset($this-&gt;_children[$key]);
<a name="l00773"></a>00773                                 $this-&gt;_children = array_values ($this-&gt;_children);
<a name="l00774"></a>00774                         }
<a name="l00775"></a>00775                 }
<a name="l00776"></a>00776                 <span class="keywordflow">return</span> $this;
<a name="l00777"></a>00777         } 
<a name="l00778"></a>00778 
<a name="l00779"></a>00779         <span class="comment">/**************** Methods of Filter ****************/</span>
<a name="l00794"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a17c6afbd8441d9fc43ec30ced99e672e">00794</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a17c6afbd8441d9fc43ec30ced99e672e" title="クラスフィルタを登録します。">regClassFilter</a> ($class) {
<a name="l00795"></a>00795                 
<a name="l00796"></a>00796         }
<a name="l00797"></a>00797 
<a name="l00810"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5904896334ee1832554f58b0de7f5bde">00810</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a5904896334ee1832554f58b0de7f5bde" title="クラスフィルタを解除します。">unregClassFilter</a> ($class) {
<a name="l00811"></a>00811                 
<a name="l00812"></a>00812         }
<a name="l00813"></a>00813 
<a name="l00827"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#aeb148ab8228b64f9c53ebaf023ba463d">00827</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#aeb148ab8228b64f9c53ebaf023ba463d" title="オブジェクトフィルタを登録します。">regObjectFilter</a> ($class) {
<a name="l00828"></a>00828                 
<a name="l00829"></a>00829         }
<a name="l00830"></a>00830         
<a name="l00843"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a05a777ef2f1f09fe86cd0133cce27660">00843</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a05a777ef2f1f09fe86cd0133cce27660" title="オブジェクトフィルタを解除します。">unregObjectFilter</a> ($class) {
<a name="l00844"></a>00844                 
<a name="l00845"></a>00845         }
<a name="l00846"></a>00846         
<a name="l00847"></a>00847         <span class="comment">/**************** 比較系メソッド ****************/</span>
<a name="l00848"></a>00848         <span class="comment">/* call結果の比較はsetDefaultやsetFormat等の後に使用するとその内容で判定するので注意。*/</span>
<a name="l00849"></a>00849         
<a name="l00861"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7bdc13455517d3bde5dd08b811d9f150">00861</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a7bdc13455517d3bde5dd08b811d9f150">eq</a> ($Value) {
<a name="l00862"></a>00862                 <span class="keywordflow">if</span> (is_object($Value)) {
<a name="l00863"></a>00863                         <span class="keywordflow">if</span> ($Value instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a>) {
<a name="l00864"></a>00864                                 $Value = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>(<span class="stringliteral">&#39;&#39;</span>, $Value)-&gt;call();
<a name="l00865"></a>00865                         }
<a name="l00866"></a>00866                 }
<a name="l00867"></a>00867                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00868"></a>00868                 <span class="keywordflow">return</span> $this-&gt;_output == $Value;
<a name="l00869"></a>00869         }
<a name="l00870"></a>00870         
<a name="l00882"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a450853ae13800f9b19cbf2b0a9e74cb1">00882</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a450853ae13800f9b19cbf2b0a9e74cb1">seq</a> ($Value) {
<a name="l00883"></a>00883                 <span class="keywordflow">if</span> (is_object($Value)) {
<a name="l00884"></a>00884                         <span class="keywordflow">if</span> ($Value instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a>) {
<a name="l00885"></a>00885                                 $Value = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>(<span class="stringliteral">&#39;&#39;</span>, $Value)-&gt;call();
<a name="l00886"></a>00886                         }
<a name="l00887"></a>00887                 }
<a name="l00888"></a>00888                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00889"></a>00889                 <span class="keywordflow">return</span> $this-&gt;_output === $Value;
<a name="l00890"></a>00890         }
<a name="l00891"></a>00891         
<a name="l00892"></a>00892         
<a name="l00899"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#aedcc52b3673b8df9425e52f13accb2a1">00899</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#aedcc52b3673b8df9425e52f13accb2a1">isEmpty</a> () {
<a name="l00900"></a>00900                 <span class="keywordflow">return</span> $this-&gt;_type == <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>;
<a name="l00901"></a>00901         }
<a name="l00902"></a>00902         
<a name="l00909"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a4af7cea238ab52f6e40a1eed86bdc1be">00909</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a4af7cea238ab52f6e40a1eed86bdc1be">isNull</a> () {
<a name="l00910"></a>00910                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00911"></a>00911                 <span class="keywordflow">return</span> !$this-&gt;_output;
<a name="l00912"></a>00912         }
<a name="l00913"></a>00913         
<a name="l00919"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a68f8091e08fce21dfe59650eef102ce2">00919</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a68f8091e08fce21dfe59650eef102ce2">isString</a> () {
<a name="l00920"></a>00920                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00921"></a>00921                 <span class="keywordflow">return</span> is_string($this-&gt;_output);
<a name="l00922"></a>00922         }
<a name="l00923"></a>00923         
<a name="l00929"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7eaae74c3493d3a74aa3a5dbc71cdf41">00929</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a7eaae74c3493d3a74aa3a5dbc71cdf41">isNumeric</a> () {
<a name="l00930"></a>00930                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00931"></a>00931                 <span class="keywordflow">return</span> is_numeric($this-&gt;_output);
<a name="l00932"></a>00932         }
<a name="l00933"></a>00933         
<a name="l00939"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2f0ab131ec6fa3f6f91721eb72ca10f0">00939</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a2f0ab131ec6fa3f6f91721eb72ca10f0">isArray</a> () {
<a name="l00940"></a>00940                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00941"></a>00941                 <span class="keywordflow">return</span> is_array($this-&gt;_output);
<a name="l00942"></a>00942         }
<a name="l00943"></a>00943         
<a name="l00949"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a51c6886df81a7ea9808d39eac07317f8">00949</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a51c6886df81a7ea9808d39eac07317f8">isObject</a> () {
<a name="l00950"></a>00950                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00951"></a>00951                 <span class="keywordflow">return</span> is_object($this-&gt;_output);
<a name="l00952"></a>00952         }
<a name="l00953"></a>00953         
<a name="l00954"></a>00954         <span class="comment">/**************** 出力系メソッド ****************/</span>
<a name="l00955"></a>00955         
<a name="l00962"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a4a20559544fdf4dcb457e258dc976cf8">00962</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a4a20559544fdf4dcb457e258dc976cf8">reset</a> () {
<a name="l00963"></a>00963                 $this-&gt;_outputFlg = <span class="keyword">false</span>;
<a name="l00964"></a>00964                 $this-&gt;_outputEmpty = <span class="keyword">false</span>;
<a name="l00965"></a>00965                 <span class="keywordflow">return</span> $this;
<a name="l00966"></a>00966         }
<a name="l00967"></a>00967         
<a name="l00976"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a25095fd1a04524b05c6e05e2f41cf230">00976</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a25095fd1a04524b05c6e05e2f41cf230">format</a> ($format = <span class="stringliteral">&#39;%s&#39;</span>) {
<a name="l00977"></a>00977                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a>(__FUNCTION__, 0x10, func_get_args())) {
<a name="l00978"></a>00978                         $this-&gt;_methodResult = $this;
<a name="l00979"></a>00979                         <span class="keywordflow">if</span> ($this-&gt;_isOutput) {
<a name="l00980"></a>00980                                 $this-&gt;_callResult = sprintf ($format, $this-&gt;_callResult);
<a name="l00981"></a>00981                         }
<a name="l00982"></a>00982                 } <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00983"></a>00983         }
<a name="l00984"></a>00984         
<a name="l00993"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7abcb05ad01a2c3551420ed4aff42882">00993</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a7abcb05ad01a2c3551420ed4aff42882">noResult</a> ($default = null) {
<a name="l00994"></a>00994                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a>(__FUNCTION__, 0x10, func_get_args())) {
<a name="l00995"></a>00995                         <span class="keywordflow">if</span> ($this-&gt;_isOutput &amp;&amp; !$this-&gt;_callResult) {
<a name="l00996"></a>00996                                 $this-&gt;_callResult = $default;
<a name="l00997"></a>00997                         }
<a name="l00998"></a>00998                 } <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00999"></a>00999         }
<a name="l01000"></a>01000         
<a name="l01009"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7f9cefb1412943272f03d5c2f3483a2b">01009</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a7f9cefb1412943272f03d5c2f3483a2b">escape</a> ($type) {
<a name="l01010"></a>01010                 <span class="keywordflow">if</span> ($this-&gt;_outputEmpty) <span class="keywordflow">return</span> $this;
<a name="l01011"></a>01011                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l01012"></a>01012                 <span class="keywordflow">switch</span> (strtolower ($type)) {
<a name="l01013"></a>01013                         <span class="keywordflow">case</span> (<span class="stringliteral">&#39;html&#39;</span>):
<a name="l01014"></a>01014                                 $this-&gt;_output = htmlspecialchars ($this-&gt;_output);
<a name="l01015"></a>01015                         <span class="keywordflow">break</span>;
<a name="l01016"></a>01016                         <span class="keywordflow">default</span>:
<a name="l01017"></a>01017                                 <span class="keywordflow">break</span>;
<a name="l01018"></a>01018                 }
<a name="l01019"></a>01019                 <span class="keywordflow">return</span> $this;
<a name="l01020"></a>01020         }
<a name="l01021"></a>01021         
<a name="l01026"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#aa7af881dda459f17d4cf8952252639b5">01026</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#aa7af881dda459f17d4cf8952252639b5">put</a> () {
<a name="l01027"></a>01027                 print $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a8fe3c1772eb471a4e511858219ebc1d5">sput</a>();
<a name="l01028"></a>01028                 <span class="keywordflow">return</span> $this;
<a name="l01029"></a>01029         }
<a name="l01030"></a>01030         
<a name="l01035"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a8fe3c1772eb471a4e511858219ebc1d5">01035</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a8fe3c1772eb471a4e511858219ebc1d5">sput</a> () {
<a name="l01036"></a>01036                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a>(__FUNCTION__, 0x10, func_get_args())) {
<a name="l01037"></a>01037                         $formats = func_get_args ();
<a name="l01038"></a>01038                         <span class="keywordflow">foreach</span> ($formats as $strFormat) {
<a name="l01039"></a>01039                                 $format = explode (<span class="charliteral">&#39;=&#39;</span>, $strFormat, 2);
<a name="l01040"></a>01040                                 <span class="keywordflow">if</span> (method_exists($this, $format[0])) {
<a name="l01041"></a>01041                                         <span class="keywordflow">if</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a>($format) == 2) $this-&gt;$format[0]($format[1]);
<a name="l01042"></a>01042                                         <span class="keywordflow">else</span> $this-&gt;$format[0]();
<a name="l01043"></a>01043                                 } elseif(is_callable($format[0])) {
<a name="l01044"></a>01044                                         <span class="keywordflow">if</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a>($format) == 2) $this-&gt;_callResult = $format[0]($this-&gt;_callResult, $this-&gt;$format[1]);
<a name="l01045"></a>01045                                         <span class="keywordflow">else</span> $this-&gt;_callResult = $format[0]($this-&gt;_callResult);
<a name="l01046"></a>01046                                 }
<a name="l01047"></a>01047                         }
<a name="l01048"></a>01048                         $this-&gt;_methodResult = $this-&gt;_callResult;
<a name="l01049"></a>01049                 }
<a name="l01050"></a>01050                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l01051"></a>01051         }
<a name="l01061"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5bf63e4ac70cfd9d97e3f2eab936ec8b">01061</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a5bf63e4ac70cfd9d97e3f2eab936ec8b">dump</a> () {
<a name="l01062"></a>01062                 print (<span class="charliteral">&#39;&quot;&#39;</span>.$this-&gt;_selector. <span class="charliteral">&#39;&quot;&#39;</span>);
<a name="l01063"></a>01063                 print (<span class="stringliteral">&#39; [name:&quot;&#39;</span>.$this-&gt;_name.<span class="stringliteral">&#39;&quot;]&#39;</span>);
<a name="l01064"></a>01064                 print (<span class="stringliteral">&#39; [type:&quot;&#39;</span>.$this-&gt;_type.<span class="stringliteral">&#39;&quot;]&#39;</span>);
<a name="l01065"></a>01065                 print (<span class="charliteral">&#39;{&#39;</span>.<span class="stringliteral">&quot;\n&quot;</span>);
<a name="l01066"></a>01066                 var_dump ($this-&gt;_instance);
<a name="l01067"></a>01067                 print (<span class="charliteral">&#39;}&#39;</span>.<span class="stringliteral">&quot;\n&quot;</span>);
<a name="l01068"></a>01068                 <span class="keywordflow">foreach</span> ($this-&gt;_children as $Key=&gt;$Val) {
<a name="l01069"></a>01069                         $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a66a9777ce025e9ce801bdf352268f5c2">child</a> ($Val-&gt;_name)-&gt;dump ();
<a name="l01070"></a>01070                 }
<a name="l01071"></a>01071                 print(<span class="stringliteral">&quot;\n&quot;</span>);
<a name="l01072"></a>01072                 <span class="keywordflow">return</span> $this-&gt;_type == <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>;
<a name="l01073"></a>01073         }
<a name="l01074"></a>01074         
<a name="l01075"></a>01075         <span class="comment">/**************** Object型用メソッド ****************/</span>
<a name="l01076"></a>01076         
<a name="l01088"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a305d469a9ba808d755b5015f0d0a31bd">01088</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a305d469a9ba808d755b5015f0d0a31bd">prop</a> () {
<a name="l01089"></a>01089                 <span class="keywordflow">if</span> ($this-&gt;_type != <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a>) <span class="keywordflow">return</span> $this;
<a name="l01090"></a>01090                 $cntArgs = func_num_args();
<a name="l01091"></a>01091                 <span class="keywordflow">if</span> ($cntArgs == 0) {
<a name="l01092"></a>01092                         <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>(<span class="stringliteral">&#39;&#39;</span>, get_object_vars($this-&gt;_instance));
<a name="l01093"></a>01093                 } elseif ($cntArgs == 1) {
<a name="l01094"></a>01094                         $property = func_get_arg(0);
<a name="l01095"></a>01095                         <span class="keywordflow">if</span> (property_exists($this-&gt;_instance, $property)) {
<a name="l01096"></a>01096                                 <span class="keywordflow">return</span> $this-&gt;_instance-&gt;$property;
<a name="l01097"></a>01097                         } <span class="keywordflow">else</span> {
<a name="l01098"></a>01098                                 <span class="keywordflow">return</span> null;
<a name="l01099"></a>01099                         }
<a name="l01100"></a>01100                 } elseif ($cntArgs &gt; 1) {
<a name="l01101"></a>01101                         $property = func_get_arg(0);
<a name="l01102"></a>01102                         $value = func_get_arg(1);
<a name="l01103"></a>01103                         $this-&gt;_instance-&gt;$property = $value;
<a name="l01104"></a>01104                         <span class="keywordflow">return</span> $this;
<a name="l01105"></a>01105                 }
<a name="l01106"></a>01106         }
<a name="l01107"></a>01107         
<a name="l01115"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a003e687a4e5bec44a663107336b83dc6">01115</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a003e687a4e5bec44a663107336b83dc6">method</a> ($method) {
<a name="l01116"></a>01116                 <span class="keywordflow">if</span> ($this-&gt;_type != <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a>) <span class="keywordflow">return</span> $this;
<a name="l01117"></a>01117                 <span class="keywordflow">if</span> (method_exists($this-&gt;_instance, $method)) {
<a name="l01118"></a>01118                         <span class="keywordflow">return</span> <a class="code" href="../../d7/d1c/class_y.html">Y</a>($method, array($this-&gt;_instance, $method), <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>);;
<a name="l01119"></a>01119                 } <span class="keywordflow">else</span> {
<a name="l01120"></a>01120                         <span class="keywordflow">return</span> <a class="code" href="../../d7/d1c/class_y.html">Y</a>($method, null, <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>);;
<a name="l01121"></a>01121                 }
<a name="l01122"></a>01122         }
<a name="l01123"></a>01123         
<a name="l01130"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a956ae93228a55a05166f239d0efc759b">01130</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a956ae93228a55a05166f239d0efc759b">addAllProp</a> () {
<a name="l01131"></a>01131                 <span class="keywordflow">if</span> ($this-&gt;_type != <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a>) <span class="keywordflow">return</span> $this;
<a name="l01132"></a>01132                 <span class="keywordflow">foreach</span> (get_object_vars($this-&gt;_instance) as $key=&gt;$var) {
<a name="l01133"></a>01133                         $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a43331c60cdffea7648b06cef12580c15">add</a> ($key, &amp;$this-&gt;_instance-&gt;$key);
<a name="l01134"></a>01134                 }
<a name="l01135"></a>01135                 <span class="keywordflow">return</span> $this;
<a name="l01136"></a>01136         }
<a name="l01137"></a>01137         
<a name="l01144"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a8d0cf839892399299170ec39a0bd6ce2">01144</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a8d0cf839892399299170ec39a0bd6ce2">addAllMethod</a> () {
<a name="l01145"></a>01145                 <span class="comment">// 登録しないメソッド</span>
<a name="l01146"></a>01146                 $nonAdd = array(<span class="stringliteral">&#39;call&#39;</span>, <span class="stringliteral">&#39;beforeGet&#39;</span>, <span class="stringliteral">&#39;afterGet&#39;</span>, <span class="stringliteral">&#39;beforeSet&#39;</span>, <span class="stringliteral">&#39;afterSet&#39;</span>);
<a name="l01147"></a>01147                 <span class="keywordflow">foreach</span> (get_class_methods ($this-&gt;_instance) as $var) {
<a name="l01148"></a>01148                         <span class="keywordflow">if</span> (array_search ($var, $nonAdd) === <span class="keyword">false</span>) {
<a name="l01149"></a>01149                                 $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a43331c60cdffea7648b06cef12580c15">add</a> ($var, array($this-&gt;_instance, $var), <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>);
<a name="l01150"></a>01150                         }
<a name="l01151"></a>01151                 }
<a name="l01152"></a>01152                 <span class="keywordflow">return</span> $this;
<a name="l01153"></a>01153         }
<a name="l01154"></a>01154         
<a name="l01161"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a880a7a1c9bb389ed8b0223d399bff433">01161</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a880a7a1c9bb389ed8b0223d399bff433">addAllMember</a> () {
<a name="l01162"></a>01162                 $this-&gt;addAllAttr();
<a name="l01163"></a>01163                 $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a8d0cf839892399299170ec39a0bd6ce2">addAllMethod</a>();
<a name="l01164"></a>01164                 <span class="keywordflow">return</span> $this;
<a name="l01165"></a>01165         }
<a name="l01166"></a>01166         
<a name="l01171"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a992ac1c5c8693fee5495256f2c601bfc">01171</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a992ac1c5c8693fee5495256f2c601bfc">info</a> () {
<a name="l01172"></a>01172                 $ret = array_merge (<a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuTori::$_info</a>, <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3" title="YuToriObject各種情報">YuToriObject::$_info</a>);
<a name="l01173"></a>01173                 <span class="keywordflow">return</span> $ret;
<a name="l01174"></a>01174         }
<a name="l01175"></a>01175 }
<a name="l01176"></a>01176 
<a name="l01181"></a>01181 function <a class="code" href="../../d7/d1c/class_y.html">Y</a> ($Selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l01182"></a>01182         <span class="keywordflow">if</span> (func_num_args() &gt; 1) <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">YuTori::rootSelector</a>($Selector, func_get_arg(1));
<a name="l01183"></a>01183         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">YuTori::rootSelector</a>($Selector);
<a name="l01184"></a>01184 }
<a name="l01185"></a>01185 
<a name="l01194"></a><a class="code" href="../../d7/d1c/class_y.html">01194</a> <span class="keyword">class </span><a class="code" href="../../d7/d1c/class_y.html">Y</a> {
<a name="l01201"></a><a class="code" href="../../d7/d1c/class_y.html#a9f0d2d52337c06f83a90bea94933191f">01201</a>         <span class="keyword">static</span> function <a class="code" href="../../d7/d1c/class_y.html#a9f0d2d52337c06f83a90bea94933191f">func</a> () {
<a name="l01202"></a>01202                 $args = func_get_args (); <span class="keywordflow">if</span> (count($args) == 1) $args = $args[0];
<a name="l01203"></a>01203                 <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>($args, <span class="stringliteral">&#39;&#39;</span>, array(), <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>);
<a name="l01204"></a>01204         }
<a name="l01205"></a>01205         
<a name="l01212"></a><a class="code" href="../../d7/d1c/class_y.html#a1847844ab8ed0f96bdfe0534c8ea8f67">01212</a>         <span class="keyword">static</span> function <a class="code" href="../../d7/d1c/class_y.html#a1847844ab8ed0f96bdfe0534c8ea8f67">file</a> ($file) {
<a name="l01213"></a>01213                 <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>($file, <span class="stringliteral">&#39;&#39;</span>, array(), <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a>);
<a name="l01214"></a>01214         }
<a name="l01215"></a>01215         
<a name="l01222"></a><a class="code" href="../../d7/d1c/class_y.html#aa2fe7bf15006fd77ea6cb0a27377e4ad">01222</a>         <span class="keyword">static</span> function <a class="code" href="../../d7/d1c/class_y.html#aa2fe7bf15006fd77ea6cb0a27377e4ad">put</a> ($selector) {
<a name="l01223"></a>01223                 <span class="keywordflow">return</span> <a class="code" href="../../d7/d1c/class_y.html">Y</a>($selector)-&gt;<a class="code" href="../../d7/d1c/class_y.html#aa2fe7bf15006fd77ea6cb0a27377e4ad">put</a>();
<a name="l01224"></a>01224         }
<a name="l01225"></a>01225 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全て</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>データ構造</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>関数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>変数</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>YuTori Classに対してMon May 21 2012 00:22:16に生成されました。&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
